<template>

<!--  private String haId;-->
<!--  private String usercount;-->
<!--  private String name;-->
<!--  private String address;-->
<!--  private String tel;-->
  <el-table
    :data="tableData"
    border
    style="width: 100%">
    <el-table-column
      fixed
      prop="haId"
      label="收货地址编号"
      width="150">
    </el-table-column>
    <el-table-column
      prop="name"
      label="收货人姓名"
      width="120">
    </el-table-column>
    <el-table-column
      prop="address"
      label="收货地址"
      width="240">
    </el-table-column>
    <el-table-column
      prop="tel"
      label="收货人电话"
      width="120">
    </el-table-column>


    <el-table-column
      fixed="right"
      label="操作"
      width="100">
      <template slot-scope="scope">
        <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
        <el-button type="text" size="small">编辑</el-button>
      </template>
    </el-table-column>
  </el-table>
</template>

<script>
  export default {
    methods: {
      handleClick(row) {
        console.log(row);
      }
    },
    created(){
      const _this = this
      axios.get('http://localhost:8181/address/listAll').then(function (resp) {
        _this.tableData = resp.data

      })
    },

    data() {
      return {
        tableData: [{
          haId: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
          tel: '普陀区'

        }, {
          haId: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
          tel: '普陀区'
        }, {
          haId: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
          tel: '普陀区'
        }]
      }
    }
  }
</script>
